//
//  housekeeperTableViewCell.m
//  sellHouse
//
//  Created by 李 佳伟 on 2018/11/22.
//  Copyright © 2018年 李 佳伟. All rights reserved.
//

#import "housekeeperTableViewCell.h"
#import "JTCSM.h"


static CGFloat imagesize = 39;
static CGFloat cell_h = 86;
@interface housekeeperTableViewCell ()
{
    HouserInfoModel *mymodel;
    
}

@end

@implementation housekeeperTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        
        [df lineViewWithHeightofTop:10 superView:self.contentView lineHeight:10 space:0];
        CGFloat top = (cell_h-imagesize)/2;
        _logoImageV = [[UIImageView alloc]initWithFrame:CGRectMake(Kspace, top, imagesize, imagesize)];
        _logoImageV.image = [UIImage imageNamed:@"guanjia.png"];
        [df layerWithView:_logoImageV radius:imagesize/2 width:1 color:RGBACOLOR(241, 241, 241, 1)];
        [self.contentView addSubview:_logoImageV];
        
        _nameLabel = [UILabel initWithFrame:CGRectMake(KVIEW_X(_logoImageV)+12, top, 200, 17) text:@"管家姓名" font:17 textAlignment:NSTextAlignmentLeft texcolor:RGBACOLOR(89, 89, 89, 1) backgroundColor:nil];
        [self.contentView addSubview:_nameLabel];
        
        UILabel *targetLabel = [UILabel initWithFrame:CGRectMake(KVIEW_X(_logoImageV)+12, KVIEW_Y(_nameLabel)+8, 200, 15) text:@"服务管家" font:14 textAlignment:NSTextAlignmentLeft texcolor:RGBACOLOR(193, 193, 193, 1) backgroundColor:nil];
        [self.contentView addSubview:targetLabel];
        
        CGFloat phoneImagesize = 30;
        _phoneImageV = [[UIImageView alloc]initWithFrame:CGRectMake(KSCREENWidth-45, (cell_h-phoneImagesize)/2, phoneImagesize, phoneImagesize)];
        _phoneImageV.image = [UIImage imageNamed:@"call.png"];
        [self.contentView addSubview:_phoneImageV];
        self.contentView.userInteractionEnabled = YES;
        _phoneImageV.userInteractionEnabled = YES;
       
        [df lineViewWithHeightofTop:cell_h superView:self.contentView lineHeight:10 space:0];
        
    }
    return self;
}
- (void)setvalueWithModel:(HouserInfoModel *)model{
    [_logoImageV sd_setImageWithURL:KImageUrl(model.tx) placeholderImage:[UIImage imageNamed:@"kefu.png"]];
    _nameLabel.text = model.hmb;
    
}

@end
